1、MySQL更改为只能本地登录
# use mysql;
# select user,host,Password from user where user='root';
# delete from user where user='root' and host='%';
2、MySQL授予外网登陆权限
grant all privileges on *.* to 授予外网登陆的用户名@'%' identified by '密码' WITH GRANT OPTION;
# grant all privileges on *.* to root@'%' identified by 'root' WITH GRANT OPTION;
# flush privileges;
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。